import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;


public class SocketThreadForAllDrawingsRequest extends Thread{
	Socket socket;
	HostNameAndPortNumber hostAndPort;
	
	public SocketThreadForAllDrawingsRequest(HostNameAndPortNumber hostAndPort){
		this.hostAndPort = hostAndPort;
	}
	public void run(){
		try {
			socket = new Socket(hostAndPort.getHostName(), hostAndPort.getPortNumber());
			if (socket == null) return;
			DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
			dos.writeInt(8);
			socket.close();
		} catch (UnknownHostException e) {
			System.out.println("unk");
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
